/*	AirAttack class declaration.
 *
*/

#ifndef AIR_ATTACK_H_
#define AIR_ATTACK_H_

#include "Behavior.h"
#include "BuildingPlacer.h"
#include <BWAPI.h>

struct UnitsRepairPos
{
	int UnitID;
	BWAPI::Position Pos;
};

struct DesignatedHealers
{
	int AirCraftID;
	bool HasDesignatedHealer;
	BWAPI::Unit* designatedHealer;
};

class AirAttack : public Behavior
{
public:
	AirAttack(std::string incName = "AirAttack");
	
	void Enter();
	void Execute();
	void Exit();

	bool CheckConditions();

	BWAPI::Unit* findNearestEnemy(BWAPI::Unit*);

private:
//	BWAPI::Unit* designatedHealer;
	std::list<UnitsRepairPos> FoundRepairingPosition;
	std::list<DesignatedHealers> HealersList;

	// On which frame did we last send everyone to attack
	int lastAirAttackFrame;

};

#endif
